Load observed net-level metrics:
Load null model derived net-level metrics:
Select only metrics of interest:
Convert dataframes to long format:
Summarize null model metrics:
Check null-models metrics distribution:
Plot to compare network types:
Summary metrics:
## # A tibble: 12 × 5
## # Groups: metric [6]
## metric type obs nulls diff
## <fct> <chr> <chr> <chr> <chr>
## 1 Connectance ind 0.3 ± 0.1 0.67 ± 0.02 -0.37 ± 0.13
## 2 Connectance sp 0.29 ± 0.13 0.61 ± 0.01 -0.32 ± 0.13
## 3 Weighted NODF ind 30.37 ± 12.13 46.03 ± 4.91 -15.66 ± 8.06
## 4 Weighted NODF sp 29.66 ± 11.53 45.7 ± 4.06 -16.03 ± 6.19
## 5 Modularity ind 0.32 ± 0.12 0.14 ± 0.02 0.18 ± 0.08
## 6 Modularity sp 0.37 ± 0.1 0.13 ± 0.02 0.24 ± 0.09
## 7 Interaction evenness ind 0.67 ± 0.07 0.66 ± 0.01 0 ± 0.03
## 8 Interaction evenness sp 0.62 ± 0.07 0.64 ± 0.01 -0.01 ± 0.04
## 9 Assortativity ind -0.48 ± 0.17 -0.48 ± 0.05 0 ± 0.08
## 10 Assortativity sp -0.5 ± 0.15 -0.49 ± 0.05 -0.01 ± 0.07
## 11 Centralization ind 0.88 ± 0.07 0.87 ± 0.01 0.01 ± 0.04
## 12 Centralization sp 0.91 ± 0.05 0.89 ± 0.01 0.02 ± 0.03
Plot comparing metrics by network one by one:
Alternative fig 2:
2nd Alternative fig 2:
3rd alternative to fig:
Model comparisions:
## Family: gaussian ( identity )
## Formula: diff ~ type + (1 | net_code)
## Data: filter(tmp2, metric == "connectance")
##
## AIC BIC logLik deviance df.resid
## -566758.8 -566720.6 283383.4 -566766.8 104996
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## net_code (Intercept) 0.0159702 0.12637
## Residual 0.0002621 0.01619
## Number of obs: 105000, groups: net_code, 105
##
## Dispersion estimate for gaussian family (sigma^2): 0.000262
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.36673 0.01863 -19.682 <2e-16 ***
## typesp 0.05023 0.02486 2.021 0.0433 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Object of Class DHARMa with simulated residuals based on 250 simulations with refit = FALSE . See ?DHARMa::simulateResiduals for help.
##
## Scaled residual values: 0.064 0.064 0.06 0.06 0.064 0.068 0.064 0.068 0.056 0.076 0.076 0.064 0.06 0.068 0.06 0.064 0.048 0.068 0.068 0.072 ...
## Family: gaussian ( identity )
## Formula: diff ~ type + (1 | net_code)
## Data: filter(tmp2, metric == "weighted.NODF")
##
## AIC BIC logLik deviance df.resid
## 622630.2 622668.4 -311311.1 622622.2 104996
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## net_code (Intercept) 48.99 6.999
## Residual 21.85 4.674
## Number of obs: 105000, groups: net_code, 105
##
## Dispersion estimate for gaussian family (sigma^2): 21.8
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -15.6569 1.0322 -15.168 <2e-16 ***
## typesp -0.3747 1.3770 -0.272 0.786
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Object of Class DHARMa with simulated residuals based on 250 simulations with refit = FALSE . See ?DHARMa::simulateResiduals for help.
##
## Scaled residual values: 0.6 0.752 0.532 0.696 0.768 0.772 0.636 0.596 0.632 0.616 0.592 0.72 0.62 0.692 0.608 0.82 0.692 0.644 0.428 0.78 ...
## Family: gaussian ( identity )
## Formula: diff ~ type + (1 | net_code)
## Data: filter(tmp2, metric == "M")
##
## AIC BIC logLik deviance df.resid
## -495708.5 -495670.2 247858.2 -495716.5 104996
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## net_code (Intercept) 0.0072475 0.08513
## Residual 0.0005164 0.02273
## Number of obs: 105000, groups: net_code, 105
##
## Dispersion estimate for gaussian family (sigma^2): 0.000516
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.18124 0.01255 14.439 < 2e-16 ***
## typesp 0.05521 0.01675 3.297 0.000977 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Object of Class DHARMa with simulated residuals based on 250 simulations with refit = FALSE . See ?DHARMa::simulateResiduals for help.
##
## Scaled residual values: 0.208 0.212 0.216 0.236 0.212 0.2 0.212 0.208 0.22 0.224 0.248 0.208 0.196 0.2 0.212 0.204 0.212 0.22 0.204 0.208 ...
## Family: gaussian ( identity )
## Formula: diff ~ type + (1 | net_code)
## Data: filter(tmp2, metric == "interaction.evenness")
##
## AIC BIC logLik deviance df.resid
## -711601.3 -711563.0 355804.6 -711609.3 104996
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## net_code (Intercept) 1.059e-03 0.032541
## Residual 6.607e-05 0.008128
## Number of obs: 105000, groups: net_code, 105
##
## Dispersion estimate for gaussian family (sigma^2): 6.61e-05
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.002954 0.004798 0.616 0.5381
## typesp -0.015793 0.006401 -2.467 0.0136 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Object of Class DHARMa with simulated residuals based on 250 simulations with refit = FALSE . See ?DHARMa::simulateResiduals for help.
##
## Scaled residual values: 0.464 0.452 0.448 0.432 0.42 0.476 0.464 0.432 0.448 0.436 0.444 0.456 0.448 0.44 0.42 0.468 0.464 0.432 0.436 0.44 ...
## Family: gaussian ( identity )
## Formula: diff ~ type + (1 | net_code)
## Data: filter(tmp2, metric == "assortativity")
##
## AIC BIC logLik deviance df.resid
## -305676.0 -305637.7 152842.0 -305684.0 104996
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## net_code (Intercept) 0.005840 0.07642
## Residual 0.003162 0.05623
## Number of obs: 105000, groups: net_code, 105
##
## Dispersion estimate for gaussian family (sigma^2): 0.00316
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.001389 0.011271 0.123 0.902
## typesp -0.009538 0.015036 -0.634 0.526
## Object of Class DHARMa with simulated residuals based on 250 simulations with refit = FALSE . See ?DHARMa::simulateResiduals for help.
##
## Scaled residual values: 0.74 0.728 0.792 0.724 0.7 0.656 0.76 0.848 0.724 0.66 0.76 0.712 0.764 0.712 0.78 0.708 0.732 0.732 0.7 0.556 ...
## Family: gaussian ( identity )
## Formula: diff ~ type + (1 | net_code)
## Data: filter(tmp2, metric == "centralization.w")
##
## AIC BIC logLik deviance df.resid
## -609303.2 -609265.0 304655.6 -609311.2 104996
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## net_code (Intercept) 0.0014017 0.03744
## Residual 0.0001752 0.01323
## Number of obs: 105000, groups: net_code, 105
##
## Dispersion estimate for gaussian family (sigma^2): 0.000175
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.014217 0.005520 2.575 0.010 *
## typesp 0.006903 0.007364 0.937 0.349
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Object of Class DHARMa with simulated residuals based on 250 simulations with refit = FALSE . See ?DHARMa::simulateResiduals for help.
##
## Scaled residual values: 0.312 0.308 0.316 0.324 0.328 0.332 0.348 0.32 0.344 0.312 0.356 0.312 0.336 0.34 0.316 0.308 0.316 0.32 0.284 0.332 ...